package com.andy.basics;

import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

@Component
@Scope("session")
public class MessageHandler {

	public void addMessage(String id, String msg) {
		FacesContext.getCurrentInstance().addMessage(id, new FacesMessage(msg));
	}
}
